package Command.commons.interfacesImpl;

/**
 * @Author: pengzx
 * @Description:
 * @Date: 14:26 2017/9/13
 * @Modified by: 1.0
 */
public class CeilingFan {
    public static final int HIGH = 3;
    public static final int MEDIUM = 2;
    public static final int LOW = 1;
    public static final int OFF = 0;
    String location;
    int speed;

    public void high()
    {
        System.out.println(location+"HIGH");
        speed = HIGH;
    }

    public void medium()
    {
        System.out.println(location+"MEDIUM");
        speed = MEDIUM;
    }

    public void low()
    {
        System.out.println(location+"LOW");
        speed = LOW;
    }

    public void off()
    {
        System.out.println(location+"OFF");
        speed = OFF;
    }

    public CeilingFan(String location)
    {
        this.location = location;
        speed = OFF;
    }

    public int getSpeed()
    {

        return speed;
    }
}
